<template>
  <div v-show="item.isShow" class="f ac pt10 pb10">
    <div
      :class="['nowrap mr10 tr', item.required ? 'need' : '']"
      :style="{
        width: item.isLabelWidth ? item.labelWidth + 'px' : 'auto',
      }"
    >
      {{item.label}}
    </div>
    <div :class="['f1 f ac xs rel rds5', item.errmsg ? 'error' : 'textAreaBd']">
      <Select class="f1" :value="item.value1" :disabled="item.disabled" @on-change="changeSelect" transfer :placeholder="[1,4].includes(modalType)  ? '' : item.placeholder" >
        <Option v-for="opt in item.options" :value="opt.id" :key="opt.value" >{{ opt.name }}</Option>
      </Select>
      <template v-for="optItem in item.options">
        <Input v-if="optItem.isNeedOther" :value="item.value2" @on-change="e => changeValue2(e, optItem)" class="ml10 f1" style="width:200px;" :placeholder="modalType == 1 ? '' : '请输入'" :disabled="item.disabled || (optItem.id != item.value1)"></Input>
      </template>
      <div class="abs l0 gred" v-if="item.errmsg" style="bottom:-20px;">{{item.errmsg}}</div>
    </div>
  </div>
</template>
<script src='./index.js'></script>
<style src='./index.css' scoped>
</style>
<style>
.CusSelect .ivu-select-selection, .CusSelect .ivu-select-selection:hover {
  border: none !important;
}
.ivu-select-item-selected, .ivu-select-item-selected:hover{
  color: #1aada7 !important;
}
.CusSelect .ivu-select-visible .ivu-select-selection{
  box-shadow: 0 0 0 2px rgba(45,140,240,.2);
}
</style>